package com.g.ocache.impl.store.entry;

import com.g.ocache.StoreEntry;

/**
 * 
 * @author zhangyf
 * @param <K>
 * @param <V>
 */
public class BasicStoreEntry<K, V> implements StoreEntry<K, V> {
	//
	private K key;
	private V value;

	/**
	 * 
	 * @param key
	 * @param value
	 */
	public BasicStoreEntry(K key, V value) {
		this.key = key;
		this.value = value;
	}
	
	/**
	 * 
	 */
	public K getKey() {
		return key;
	}

	public V getValue() {
		return value;
	}
	
	public boolean isExpired() {
		return false;
	}
	
	/**
	 * 
	 */
	public static class FactoryImpl<K, V> implements Factory<K, V> {
		
		public StoreEntry<K, V> create(K key, V value) {
			return new BasicStoreEntry<K, V>(key, value);
		}
	}
}
